<?php
/*the yinhen entrance */
$mtime = explode(' ', microtime());
$starttime = $mtime[1] + $mtime[0];

define('ROOT_PATH', dirname(__FILE__));

require 'config/Config.php';
require 'includes/YH.class.php';
require 'includes/Database.class.php';
require 'includes/Template.class.php';
require 'includes/Language.class.php';
require 'includes/Model.class.php';

// Magic Quotes Fix
if (ini_get('magic_quotes_gpc')) 
{
	function clean($data) 
	{
   		if (is_array($data)) 
		{
  			foreach ($data as $key => $value) 
			{
    			$data[clean($key)] = clean($value);
  			}
		} 
		else 
		{
  			$data = stripslashes($data);
		}
	
		return $data;
	}
	
	$_GET = clean($_GET);
	$_POST = clean($_POST);
	$_COOKIE = clean($_COOKIE);
}

YH::run();